package com.baike.feign.fallback;

import com.baike.damian.FmLessonDTO;
import com.baike.data.Result;
import com.baike.em.ConstantEnum;
import com.baike.feign.LessonServiceFeign;
import org.springframework.stereotype.Component;

/**
 * @author:pjm
 */
@Component
public class LessonServiceFeignFallback implements LessonServiceFeign {
    @Override
    public Result<FmLessonDTO> selectByLessonId(Long lessonId) {
        //需要写降级逻辑,大多数公司打印日志
        //打印错误信息,方便以后查询
        return Result.build(ConstantEnum.FALL_BACK);
    }
}
